* table 3

use Diversification.dta, clear

gen  GDPpcppp2= GDPpcppp* GDPpcppp

* elimination of microstates

egen mpop=mean(pop), by(reporter)
drop if mpop<1000000

* Logistic transformation*

gen LgGini=log(Gini/(1-Gini))
gen LgNber=log(Nber/(4991-Nber))

* col (1)
xi: reg  LgGini GDPpcppp GDPpcppp2 , robust
* col (2)
xi: reg  LgNber GDPpcppp GDPpcppp2 , robust

* Negative binomial model*

encode reporter, gen(id)

* col (3)
nbreg  Nber GDPpcppp GDPpcppp2, robust


* GMM system*

tsset id year, yearly

* columns (4) (5) (6) (7)

xi: xtabond2  HHI GDPpcppp GDPpcppp2 i.year, gmm(GDPpcppp GDPpcppp2, lag(2 4)) iv(i.year, equation(level)) robust
xi: xtabond2  T GDPpcppp GDPpcppp2 i.year, gmm(GDPpcppp GDPpcppp2, lag(2 4)) iv(i.year, equation(level)) robust
xi: xtabond2 Gini GDPpcppp GDPpcppp2 i.year, gmm(GDPpcppp GDPpcppp2, lag(2 4)) iv(i.year, equation(level)) robust
xi: xtabond2  Nber GDPpcppp GDPpcppp2 i.year, gmm(GDPpcppp GDPpcppp2, lag(2 4)) iv(i.year, equation(level)) robust

